class UserMailer < ActionMailer::Base
  default from: "notice@gmail.com"

  def create_ticket(client)
    access_token = client.access_token
    ticket_id = client.tickets.first.id

    @caption = client.tickets.first.title
    @url = "/tickets/#{ticket_id}/read/#{access_token}"
    mail(
        :to => client.email,
        :subject => "You have created a ticket"
    )
  end
end
